package powerOfTwo;

public class Solution {
    public boolean isPowerOfTwo(int n) {
    	int t=0;
    	if (n==0) return false;
        while (n>0){
        	if (n%2==1) t++;
        	n=n%2;
        }
    
    if (t==1 ) return true;
    else return false;
    }
}